param($installPath, $toolsPath, $package, $project)

$file = $project.ProjectItems | ForEach-Object { $_.ProjectItems } | where { $_.Name -eq "App.xaml.cs" }
if($file) {
    $file.Open()
    $file.Document.Activate()
    $file.Document.Selection.StartOfDocument()
    $file.Document.ReplaceText("Window.Current.Activate();", "Window.Current.Activate();`nXamlInspector.Client.Run();")
}
